<?php 
/* P3(c)

******************************************************************************
                                                                                      
                         __                                                        
                        /__)                                                       
                       /__        P3 - moving Technologie            
                        __)                                                          
                        __)                                                          
                                                                                        
                                                                                        
       Copyright 2009 by p3.co.at                                                                                 
                                                                                        
       visit www.p3.co.at to get more Informations 
       about Teriko - Betriebsdatenerfassung                                                                                 
       - it's not allowed to change this scripts
       - it's not allowed to remove this copyright-tag

       -- you can download the complete license   
          under http://www.teriko.org

 (c) by Patrik Pfaffenbauer and P3 (http://www.p3.co.at)

 | Programname: P3.Teriko
 | Authtor: P3.Verein
 | Coder: Patrik Pfaffenbauer
 | Version: 0.1

 | Change Index
 |_____________________________________________
 |                                             |
 |4.3.2010 Erstellung | Patrik Pfaffenbauer    |
 |_____________________________________________|

******************************************************************************

P3(c) */

class Toolbar
{
	function Toolbar()
	{
		$site = $_GET['s'];
		$toolbar = GetObject($site);
		
		if($site == "")
			$toolbar = new Base();
		
			if($toolbar->toolbar && $toolbar->allowed)
			{
				echo '<div id="toolbar-box">
		   					<div class="t">
								<div class="t">
									<div class="t">
									</div>
							</div>
						</div>
					<div class="m">
						<div class="toolbar" id="toolbar">
							<table class="toolbar">
								<tr>';
				if($_POST['action'] == "add")
					$paint = true;
				else if($_POST['action'] == "edit")
					$paint = true;
				else
					$paint = true;
					
				if($paint)
					$toolbar->Toolbar();
								
				echo			'</tr>
							</table>
						</div>
					<div class="header '.$toolbar->toolbarClass.'">';
						echo $toolbar->title;
				echo '	</div>
					<div class="clr">
					</div>
					</div>
		
					<div class="b">
						<div class="b">
							<div class="b"></div>
						</div>
					</div>
		  		</div>
		   		<div class="clr"></div>
				';
			}
			else if(!$toolbar->allowed)
			{
				echo '<div id="toolbar-box">
		   					<div class="t">
								<div class="t">
									<div class="t">
									</div>
							</div>
						</div>
					<div class="m">
						<div class="toolbar" id="toolbar">
							<table class="toolbar">
								<tr>';
								
								
				echo			'</tr>
							</table>
						</div>
					<div class="header icon-48-error">';
						echo $GLOBALS['lang']->GetLanguage("Common", "noPermission");
				echo '	</div>
					<div class="clr">
					</div>
					</div>
		
					<div class="b">
						<div class="b">
							<div class="b"></div>
						</div>
					</div>
		  		</div>
		   		<div class="clr"></div>
				';
			}
	}
}

?>